home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 301-325 / disk_313 / uucp / uucp1.lzh / src / lib / lsys.c < prev    next >
C/C++ Source or Header  |  1990-01-14  |  621b  |  39 lines

  1.  
  2. /*
  3.  *  LSYS.C
  4.  *
  5.  *  (C) Copyright 1989-1990 by Matthew Dillon,  All Rights Reserved.
  6.  *
  7.  */
  8.  
  9. #include <stdio.h>
  10.  
  11. int
  12. is_in_L_sys_file(system_name)
  13. char *system_name;
  14. {
  15.     static char buf[256];
  16.     static char system[128];
  17.     FILE *fd;
  18.  
  19.     if (!(fd = fopen("UULIB:L.sys","r"))) {
  20.     printf("Couldn't open UULIB:L.sys file\n");
  21.     exit(1);
  22.     }
  23.  
  24.     sprintf(system,"%s ", system_name);
  25.  
  26.     while (NULL != fgets(buf, sizeof buf, fd)) {
  27.     if (buf[0] == '#' || buf[0] == '\n')
  28.         continue;
  29.     if (strncmp(buf, system, strlen(system)) == 0) {
  30.         fclose(fd);
  31.         return TRUE;
  32.     }
  33.     }
  34.     fclose(fd);
  35.     return FALSE;
  36. }
  37.  
  38.  
  39.